package cn.com.self.apis.portal.entity;

import cn.com.self.apis.files.entity.Files;
import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Date;

@ApiModel(value = "纠纷申请表")
@Data
@TableName("u_dispute")
public class UDisputeEntity extends AbstractEntity implements Serializable {
    @NotNull(message = "发起人id不能为空")
    @NotBlank(message = "发起人id不能为空")
    @ApiModelProperty(value = "发起人id")
    private Long memberId;
    @ApiModelProperty(value = "托管信息id")
    private Long escrowId;
    @ApiModelProperty(value = "纠纷描述")
    private String content;
    @ApiModelProperty(value = "纠纷状态（1纠纷中、2撤销、3通过、4未通过）")
    private Integer disputeState;
    @ApiModelProperty(value = "备注")
    private String remarks;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    @TableField(exist=false)
    @ApiModelProperty(value = "纠纷附件列表")
    private ArrayList<Files> disputeFiles;

    @TableField(exist=false)
    @ApiModelProperty(value = "发起人姓名")
    private String memberName;
}
